package com.candy.exp;

import java.io.FileInputStream;
import java.io.FileNotFoundException;

/**
 * @author donglin
 * @Title:
 * @类名: Test02
 * @date 2020/12/30
 */
public class Test02 {
    public static void main(String[] args) {
        test03();
    }

    public static void test03() {

        int a=0;
        if(a==0){
            throw new NullPointerException();
        }



    }

    public static void test02() {
        try {
            test01();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }

    }

    public static void test01() throws FileNotFoundException {
//        主动抛出异常，由上层调用者决定是否要对该异常进行处理
        FileInputStream is=new FileInputStream("");

    }
}
